package com.xoms.front.persist.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.xoms.front.model.RoleBean;
import com.xoms.front.model.res.RoleResourceBean;
import com.xoms.front.persist.dao.ResourceDao;

@Repository
public class ResourceImpl extends BaseImpl implements ResourceDao {
	
	final String NAME_SPACE = NAME_SPACE_HEADER + ".ResourceMapper";

	@Override
	public List<RoleBean> selectRoles2Account(String accId) {
		return sqlSessionTemplate.selectList(NAME_SPACE + ".selectRoles2Account", accId);
	}

	@Override
	public int selectCount2Account(String accid) {
		return sqlSessionTemplate.selectOne(NAME_SPACE + ".selectCount2Account", accid);
	}

	@Override
	public List<RoleResourceBean> selectRoleResouces2Account(String accId) {
		return sqlSessionTemplate.selectList(NAME_SPACE + ".selectRoleResouces2Account", accId);
	}

}
